Pattern quality: Fix status-report archetype missing min-integrity: none in generated workflow - #262
Conversation
…n tip The status-report archetype's tips list explicitly instructs setting tools.github.min-integrity: none (since status reports only summarize untrusted issue/PR/discussion content, never act on it), but the archetype definition in patterns/workflow-generation.json had no min_integrity field, so generateWorkflowFile never emitted the line in the suggested starter YAML shown to the downstream agent. Downstream agents anchor heavily on the concrete starter YAML in the prompt over prose guidance buried in a bullet list, so the omission meant many generated status-report workflows likely dropped this safety setting despite the tip. Fix: add "min_integrity": "none" to the status-report archetype so the generated frontmatter matches its own documented guidance. Also updated the outdated test that asserted status-report never gets min-integrity, and added a replacement test using documentation-updater (an archetype without github toolsets) to keep coverage for archetypes that legitimately omit min-integrity. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟢 Approval recommended
The change is narrowly scoped, matches the generator’s existing emission logic, and is covered by updated unit tests.
Pull request overview
This PR aligns the generated starter YAML for the status-report archetype with its own documented guidance by ensuring tools.github.min-integrity: none is emitted when the archetype reads untrusted GitHub content but only produces a summary.
Changes:
- Added
"min_integrity": "none"to thestatus-reportarchetype inpatterns/workflow-generation.jsonso the generator includesmin-integrity: noneundertools.github. - Updated
test/workflow.test.jsto assertstatus-reportincludesmin-integrity: none, and added a separate regression test ensuring archetypes without GitHub toolsets don’t emitmin-integrity.
File summaries
| File | Description |
|---|---|
patterns/workflow-generation.json |
Adds min_integrity: "none" to the status-report archetype definition so generated workflows include the intended safety setting. |
test/workflow.test.js |
Updates tests to reflect the new expected status-report output and preserves coverage for archetypes that should omit min-integrity. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Reviewer: matt-pocock (data/test config change). This is a small, well-justified fix: adding min_integrity: none to the status-report archetype so generated YAML matches the archetype's own documented tip, plus updating the test that previously encoded the missing field as expected behavior. The added test for documentation-updater reasonably preserves coverage for archetypes without github_toolsets. No correctness, security, or build risk found — no blocking issues.
Generated by Specialist PR Review for #262 · copilot · auto · 13.8 AIC · ⌖ 6.39 AIC · ⊞ 8.1K
What was evaluated
Reviewed all 6 samples in
/tmp/gh-aw/data/generated-patterns-and-prompts.json(status-report, issue-triage, code-improvement, documentation-updater, dependency-monitor, pr-review), comparing each generatedpatternobject and prompt/starter-YAML againstpatterns/workflow-generation.json,patterns/archetypes/*.json, and the generator insrc/js/workflow.js.Recurring quality issue found
The
status-reportarchetype's owntipslist instructs:This tip is correctly surfaced in the generated prompt text ("Follow the workflow-specific guidance..."), but the
status-reportarchetype definition inpatterns/workflow-generation.jsonhad nomin_integrityfield. SincegenerateWorkflowFileinsrc/js/workflow.jsonly emitsmin-integritywhen the archetype definition sets it, the "## Suggested workflow file" starter YAML shown to the downstream agent silently omittedmin-integrity: noneundertools.github, even though it listsgithub_toolsets: trueand reads discussions/issues/PRs.Downstream agents strongly anchor on the concrete starter YAML they're told to use "as a starting point," so a contradiction between the prose tip and the omitted example line risks the safety setting being dropped in generated workflows — undermining the exact guidance the pattern library itself recommends.
Notably, the existing test suite even encoded the bug as expected behavior (
does not add min-integrity for archetypes without untrusted external content, asserting status-report never getsmin-integrity), which no longer matches the archetype's stated guidance for reading untrusted content.What changed
patterns/workflow-generation.json: added"min_integrity": "none"to thestatus-reportarchetype definition, so generated status-report workflows includemin-integrity: noneundertools.github, matching the archetype's own documented tip.test/workflow.test.js: replaced the now-incorrect test with one assertingmin-integrity: noneis emitted forstatus-report, and added a new test usingdocumentation-updater(an archetype withoutgithub_toolsets) to preserve coverage for archetypes that legitimately omitmin-integrity.Validation
npm test: 320/320 tests passed (18 test files).npm run build: succeeded,dist/patterns/workflow-generation.jsonregenerated with the new field.Follow-up ideas deliberately left out
pr-review,status-report) that referencemin-integrityin their tips — both are now consistent with their generated output.pattern/manifest.jsonscan-derived success-rate or archetype metadata, since those are regenerated from raw scan data and out of scope per the task's DO NOT rules.